<!doctype html>
<html lang="ja">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="/assets/manage.css" type="text/css" />
</head>
<body>
	
<? if(isset($description)) { ?>
	<?= $description; ?><br />
<? } ?>	
<? if(isset($error)) { ?>
	<font color='red'><?= $error; ?></font><br />
<? } ?>	

事業者+広告IDでユニークです。変えると別案件として追加されます。
<hr>
<form method="post" name="form1" action="/manage/reward/list/">
	<input type='hidden' name='action' value='add'>
<table>
	<tr>
		<td>事業者</td>
		<td width=85%>
			<input type='text' size=6 name='ad_company' value='<?= isset($detail['ad_company']) ? $detail['ad_company'] : ''; ?>'>
			※最大6文字 moba8 appdrv ca smaad affile
		</td>
	</tr>
	<tr>
		<td>広告ID</td>
		<td><input type='text' size=20 name='ad_id' value='<?= isset($detail['ad_id']) ? $detail['ad_id'] : ''; ?>'></td>
	</tr>
	<tr>
		<td>アイコン画像URL</td>
		<td>
			<? if(isset($detail['icon'])) {?><img src='<?= $detail['icon']; ?>' width=64 height=64><br><? } ?>
			<input type='text' size=60 name='icon' value='<?= isset($detail['icon']) ? $detail['icon'] : ''; ?>'>
		</td>
	</tr>
	<tr>
		<td>リンクURL</td>
		<td><input type='text' size=60 name='link' value='<?= isset($detail['link']) ? $detail['link'] : ''; ?>'></td>
	</tr>
	<tr>
		<td>ポイント</td>
		<td>
			<input type='text' size=4 name='point' value='<?= isset($detail['point']) ? $detail['point'] : ''; ?>'>pt<br>
			※外部案件の場合は連携APIで受け取ったポイントが付与されます
		</td>
	</tr>
	<tr>
		<td>報酬</td>
		<td>¥<input type='text' size=5 name='payment' value='<?= isset($detail['payment']) ? $detail['payment'] : ''; ?>'></td>
	</tr>
	<tr>
		<td>タイトル</td>
		<td><input type='text' size=60 name='title' value='<?= isset($detail['title']) ? $detail['title'] : ''; ?>'></td>
	</tr>
	<tr>
		<td>簡易獲得条件</td>
		<td><input type='text' size=60 name='subtitle' value='<?= isset($detail['subtitle']) ? $detail['subtitle'] : ''; ?>'></td>
	</tr>
	<tr>
		<td>獲得条件</td>
		<td><textarea name='advertisement' cols=60 rows=5><?= isset($detail['advertisement']) ? $detail['advertisement'] : ''; ?></textarea></td>
	</tr>
	<tr>
		<td>注意事項</td>
		<td><textarea name='notice' cols=60 rows=10><?= isset($detail['notice']) ? $detail['notice'] : ''; ?></textarea></td>
	</tr>
	<tr>
		<td>詳細説明</td>
		<td><textarea name='description' cols=60 rows=10><?= isset($detail['description']) ? $detail['description'] : ''; ?></textarea></td>
	</tr>
	<tr>
		<td>優先度</td>
		<td><input type='text' name='score' size=4 value='<?= isset($detail['score']) ? $detail['score'] : '0'; ?>'> ※CPIは1000以上</td>
	</tr>
	<tr>
		<td>カテゴリー<br>ｶﾝﾏ区切り</td>
		<td><input type='text' name='category' value='<?= isset($detail['category']) ? $detail['category'] : ''; ?>'><br>
			※カンマ区切りで複数指定可<br>
			※web…Webサイト apl…アプリ  free…無料  new…ずっと新着  click…クリック成果<br>
		</td>
	</tr>
	<tr>
		<td>取得日</td>
		<td>
			<input type='text' name='post_date' size=20 value='<?= isset($detail['post_date']) ? $detail['post_date'] : date('Y-m-d H:i:s'); ?>'><br>
			※この日時から24時間は新着となります
		</td>
		</tr>
	<tr>
		<td>審査中</td>
		<td>
			<select name="review" value="0">
				<option value="0" <?= (isset($detail['review']) ? $detail['review'] : '') == 0 ? 'selected' : ''; ?>>隠す</option>
				<option value="1" <?= (isset($detail['review']) ? $detail['review'] : '') == 1 ? 'selected' : ''; ?>>表示</option>
			</select>
		</td>
	</tr>
	<tr>
		<td>内部管理id</td>
		<td><?= isset($detail['reward_id']) ? $detail['reward_id'] : ''; ?></td>
	</tr>
	<tr>
		<td>作成日</td>
		<td><?= isset($detail['post_date']) ? $detail['post_date'] : ''; ?></td>
	</tr>

	<tr>
		<td></td>
		<td><input type='submit' value='追加/更新'>　　<a href="/manage/reward/list/">キャンセル</a></td>
	</tr>
</table>
</form>

</body>
</html>
